/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/page',
    method: 'get',
    params: query
  })
}

// 专项工作创建保存
export function saveZhuanxiang(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/saveZhuanxiang',
    method: 'post',
    params: query
  })
}

//评价人列表查询
export function zxpjList(query) {
  ////console.log("id===="+id)
  return request({
    url: '/appr-contract/zxgzchuangjian/zxpjPage',
    method: 'get',
    params: query
  })
}

//参与人列表查询
export function zxcyList(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/zxcyPage',
    method: 'get',
    params: query
  })
}

//通过评分人获取参与人
export function getCyrById(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/getCyrById',
    method: 'get',
    params: query
  })
}

//保存参与人当前行
export function saveRow(obj) {
  return request({
    url: '/appr-contract/zxgzchuangjian/saveRow',
    method: 'post',
    data: obj
  })
}

export function saveZxgzShCy(obj) {
  return request({
    url: '/appr-contract/zxgzshcy/saveZxgzShCy',
    method: 'post',
    data: obj
  })
}
//获取参与人
export function getCyr(zxid) {
  return request({
    url: '/appr-contract/zxgzcyr/getCyr/' + zxid,
    method: 'get'
  })
}
//获取审核人
export function getShr(zxid) {
  return request({
    url: '/appr-contract/zxgzshr/getShr/' + zxid,
    method: 'get'
  })
}
//获取审核人
export function getZxpfList(zxid) {
  return request({
    url: '/appr-contract/zxgzchuangjian/getZxpfList/' + zxid,
    method: 'get'
  })
}
export function saveCyrBycount(obj) {
  return request({
    url: '/appr-contract/zxgzcyr/saveCyrBycount',
    method: 'post',
    data: obj
  })
}
export function saveShrBycount(obj) {
  return request({
    url: '/appr-contract/zxgzshr/saveShrBycount',
    method: 'post',
    data: obj
  })
}
export function savePfBycount(obj) {
  return request({
    url: '/appr-contract/zxgzchuangjian/savePfBycount',
    method: 'post',
    data: obj
  })
}

// 合同信息返回值
export function page(query) {
  return request({
    url: '/appr-contract/zxgzshcy/page',
    method: 'get',
    params: query
  })
}
//获取审核人
export function getListpfcyr(query) {
  return request({
    url: '/appr-contract/zxgzshcy/getListpfcyr',
    method: 'post',
    data: query

  })
}
export function updateCyshById(id,flag) {
  return request({
    url: '/appr-contract/zxgzshcy/updateCyshById/' + id+'/'+flag,
    method: 'get'
  })
}
export function updateZxgzcysh(query) {
  return request({
    url: '/appr-contract/zxgzshcy/updateZxgzcysh',
    method: 'post',
    data: query
  })
}
//保存参与人打分人信息
export function saveAllInfo(obj) {
  return request({
    url: '/appr-contract/zxgzchuangjian/saveAllInfo',
    method: 'post',
    data: obj
  })
}
//新增专项任务接口
//列表
export function getzxgzcjpage(query) {
  return request({
    url: '/appr-contract/zxgzpfmb/page',
    method: 'get',
    params: query
  })
}
//导出
export function exportExcel(query) {
  return request({
    url: '/appr-contract/hetonghtcj/exportExcel',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}
//字表列表
export function getzxgzZibiaoPage(query) {
  return request({
    url: '/appr-contract/zxgzpfmbsub/getMbsubList',
    method: 'get',
    params: query
  })
}
export function getZxgzFaQi() {
  return request({
    url: '/appr-contract/zdrwfaqi/getRenWuFaQi',
    method: 'post',
  })
}
export function saveZxgzFaQi(query) {
  return request({
    url: '/appr-contract/zxgzpfmb/save',
    method: 'post',
    data: query
  })
}
//删除
export function deleteBatchcj(query) {
  return request({
    url: '/appr-contract/zxgzpfmb/deleteBatch',
    method: 'get',
    params: query
  })
}

// 详情删除任务
export function removeMbsubById(id) {
  return request({
    url: '/appr-contract/zxgzpfmbsub/removeMbsubById/'+id,
    method: 'get',
  })
}
// 详情任务编辑
export function updateMbsubById(query) {
  return request({
    url: '/appr-contract/zxgzpfmbsub/updateMbsubById',
    method: 'post',
    data: query
  })
}
// 详情添加任务
export function addMbsub(query) {
  return request({
    url: '/appr-contract/zxgzpfmbsub/addMbsub',
    method: 'post',
    data: query
  })
}
// 任务发起修改
export function updateForMb(query) {
  return request({
    url: '/appr-contract/zxgzpfmb/updateForMb',
    method: 'post',
    data: query
  })
}

